<template>
    <div class="auto-player">
        <aplayer :music="options" />
    </div>
</template>

<script>
    import Aplayer from 'vue-aplayer'
    export default {
        name: 'audioPlayer',
        props: {
            url: {
                type: String,
                default: ''
            },
            name: { // 文件名
                type: String,
                default: ' '
            },
            crtName: { // 作者
                type: String,
                default: ' '
            }
        },
        components: {
            Aplayer,
        },
        computed: {
            options() {
                return {
                    title: this.name,
                    artist: this.crtName,
                    src: this.url,
                    pic: '',
                    mode: 'order'
                }
            }
        }
    }

</script>
